<?php

class Remanejamento_Form_InscricaoEtp1 extends Twitter_Bootstrap_Form_Horizontal
{

    public function init()
    {
        $this->setIsArray(true)
             ->setElementsBelongTo('');        
        
        $this->setAction('/remanejamento/inscricao/etapa1')
             ->setName('Form_Inscricao1')
             ->setMethod('post');

        
        $this->addElement('text', 'cpf', array('label'         => 'CPF:*',
                                                'required'     => true,
                                                'readonly'     => 'readonly',
                                                'maxlength'    => 15,
                                                'class'        => 'imptCpf span4',
                                                'filters'      => array('StringTrim', 'StripTags'),
                                                'validators'   => array(array('StringLength', false, array(11,15)))
                          ));        

        $this->addElement('text', 'matricula', array('label'        => 'Matrícula:*',
                                                     'required'     => true,
                                                     'readonly'     => 'readonly',
                                                     'class'        => 'imptMatricula span4',
                                                     'filters'      => array('StringTrim', 'StripTags'),
                                                     'validators'   => array(array('StringLength', false, array(3,10)))
                          ));        

        
        $this->addElement('text', 'nome', array('label'        => 'Nome:*',
                                                'required'     => true,
                                                'readonly'     => 'readonly',
                                                'maxlength'    => 100,
                                                'class'        => 'imptNome span9',
                                                'filters'      => array('StringTrim', 'StripTags'),
                                                'validators'   => array(array('StringLength', false, array(3,100)))
                          ));        

        
        $this->addElement('text', 'endereco', array('label'        => 'Endereço:*',
                                                    'required'     => true,
                                                    'readonly'     => 'readonly',
                                                    'maxlength'    => 100,
                                                    'class'        => 'imptEndereco span9',
                                                    'filters'      => array('StringTrim', 'StripTags'),
                                                    'validators'   => array(array('StringLength', false, array(5,100)))
                          ));        
      

        
        $this->addElement('text', 'tempoServico', array('label'         => 'Tempo de Serviço:*',
                                                        'required'      => true,
                                                        'readonly'     => 'readonly',
                                                        'maxlength'     => 5,
                                                        'class'         => 'span2 imptTmpServico',
                                                        'filters'       => array('StringTrim', 'StripTags'),
                                                        'validators'    => array(array('StringLength', false, array(1,5)), 'Int')
                          ));        

        
        $this->addElement('text', 'estado', array('label'       => 'Estado:',
                                                  'required'    => true,
                                                  'readonly'    => 'readonly',
                                                  'class'       => 'imptEstado span2',
                                                  'filters'     => array('StringTrim', 'StripTags')
                          ));        

        
        $this->addElement('text', 'bairro', array('label'       => 'Bairro:',
                                                  'required'    => true,
                                                  'readonly'    => 'readonly',
                                                  'class'       => 'imptBairro',
                                                  'filters'     => array('StringTrim', 'StripTags')
                          ));        

        
        $this->addElement('text', 'municipio', array('label'      => 'Municipio:',
                                                     'required'   => true,
                                                     'readonly'   => 'readonly',
                                                     'class'      => 'imptMunicipio',
                                                     'filters'    => array('StringTrim', 'StripTags')
                          ));        

        
        $this->addElement('text', 'cep', array('label'      => 'CEP',
                                               'required'   => true,
                                               'maxlength'  => 9,
                                               'readonly'     => 'readonly',
                                               'class'      => 'imptCep',
                                               'filters'    => array('StringTrim', 'StripTags'),
                                               'validators' => array(array('StringLength', false, array(8,9)))
                          ));    

        
        $this->addElement('text', 'email', array('label'       => 'Email:',
                                                 'readonly'     => 'readonly',
                                                 'class'      => 'imptEmail span7',
                                                 'filters'     => array('StringTrim', 'StripTags'),
                                                 'validators'  => array('EmailAddress')
                          ));  
        
        $this->addElement('select', 'servidor20_20', array('label'         => 'Servidor 20/20?',
                                                           'required'      => true,
                                                           'multiOptions'  => array(""    => "Escolha uma opção",
                                                                                    "0"   => "Não",
                                                                                    "1"   => "Sim")
                          ));
        
        
        $this->addElement('select', 'pne', array('label'         => 'Portador de necessidades especiais?',
                                                 'required'      => true,
                                                 'multiOptions'  => array(""    => "Escolha uma opção",
                                                                          "0"   => "Não",
                                                                          "1"   => "Sim")
                            ));  
        
        
        $this->addElement('hidden', 'emp_cd_lotacao_1', array('filters' => array('StringTrim', 'StripTags'),
                                                              'class'   => 'emp_cd_lotacao_1'));
        $this->addElement('hidden', 'emp_dr', array('filters' => array('StringTrim', 'StripTags'),
                                                    'class'   => 'emp_dr'));
        $this->addElement('hidden', 'tp_lotacao_1', array('filters' => array('StringTrim', 'StripTags'),
                                                          'class'   => 'tp_lotacao_1'));
        $this->addElement('hidden', 'emp_turno', array('filters'  => array('StringTrim', 'StripTags'),
                                                       'class'    => 'emp_turno'));
        $this->addElement('hidden', 'emp_carga_hor', array('filters'  => array('StringTrim', 'StripTags'),
                                                           'class'    => 'emp_carga_hor'));
        $this->addElement('hidden', 'emp_lot_definitiva', array('filters'  => array('StringTrim', 'StripTags'),
                                                                'class'    => 'emp_lot_definitiva'));
        $this->addElement('hidden', 'ds_lotacao_1', array('filters'  => array('StringTrim', 'StripTags'),
                                                          'class'    => 'ds_lotacao_1'));
        
        
        $this->addElement('hidden', 'emp_cd_lotacao_2', array('filters'   => array('StringTrim', 'StripTags'),
                                                              'class'     => 'emp_cd_lotacao_2'));
        $this->addElement('hidden', 'emp_dr_sec', array('filters' => array('StringTrim', 'StripTags'),
                                                        'class'   => 'emp_dr_sec')); 
        $this->addElement('hidden', 'tp_lotacao_2', array('filters' => array('StringTrim', 'StripTags'),
                                                          'class'   => 'tp_lotacao_2'));        
        $this->addElement('hidden', 'emp_turno_sec', array('filters'  => array('StringTrim', 'StripTags'),
                                                           'class'    => 'emp_turno_sec'));
        $this->addElement('hidden', 'emp_carga_hor_2', array('filters'  => array('StringTrim', 'StripTags'),
                                                             'class'    => 'emp_carga_hor_2'));
        $this->addElement('hidden', 'emp_lot_definitiva_1', array('filters' => array('StringTrim', 'StripTags'),
                                                                  'class'   => 'emp_lot_definitiva_1'));
        $this->addElement('hidden', 'ds_lotacao_2', array('filters'   => array('StringTrim', 'StripTags'),
                                                          'class'     => 'ds_lotacao_2'));        
        
    }
}